package cn.com.wangluotongxin.database.mysql.utils;

import cn.com.wangluotongxin.mysql.pojo.TableColumnsVo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SourceMySqlTableColumnsUtil {

    public final static String MAP_KEY = "column";

    private static Map<String, List<TableColumnsVo>> columnMap = new HashMap<>();

    public static void set(String tableName, List<TableColumnsVo> columnsVos){
        columnMap.put(MAP_KEY.concat("_").concat(tableName), columnsVos);
    }

    public static List<TableColumnsVo> get(String tableName) {
        return columnMap.get(MAP_KEY.concat("_").concat(tableName));
    }

    public static void remove(String tableName) {
        columnMap.remove(MAP_KEY.concat("_").concat(tableName));
    }
}
